﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class EarlyWarning_HospitalSelect : System.Web.UI.Page
{
    string _AreaId = string.Empty;
    protected void Page_Load(object sender, EventArgs e)
    {
        _AreaId = HZ.Fun.CheckString(Request.QueryString["_AreaId"]);

        if (!this.IsPostBack)
        {
            DataBind();
        }
    }

    private void DataBind()
    {
        int t = 0;
        HZ.Supervise.IBLL.IBLL_PreWarning pre =  HZ.Supervise.BLLFactory.IBLL_PreWarning();
        string _HospitalName = HZ.Fun.CheckString(this.txtHospital.Text);

        System.Data.DataTable dt = pre.GetHospital(_HospitalName, "", AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize, out t);
        AspNetPager1.RecordCount = t;
        this.gridInfo.DataSource = dt;
        this.gridInfo.DataBind();
        
    }
    protected void AspNetPager1_PageChanged(object sender, EventArgs e)
    {
        DataBind();
    }
    protected void btnEnter_Click(object sender, EventArgs e)
    {
        AspNetPager1.CurrentPageIndex = 1;
        DataBind();
    }
    
}
